package com.ruoyi.system.service;

import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

public interface ChatService {


    /**
     * 聊天
     * @param request
     * {
     *     "question":string
     *     "stream":boolean
     *     "session_id"：（可选）string
     *     "user_id：（可选）string
     * }
     * @return
     */
    TableDataInfo sendCompletion(
            Map<String,Object> request
    );

    /**
     * 创建会话
     * @param requestBody
     * {
     *     "name":string
     *     "user_id"：（可选）string
     * }
     * @return
     */
    TableDataInfo createSession(
            Map<String, Object> requestBody
    );

    /**
     * 更新会话
     * @param sessionId
     * @param requestBody
     * {
     *     "name:string
     *     "user_id：（可选）string
     * }
     * @return
     */
    TableDataInfo updateSession(
            String sessionId,
            Map<String, Object> requestBody
    );

    /**
     * 列出聊天助手的会话
     * @param requestBody
     * @return
     */
    TableDataInfo getSessions(
            Map<String, Object> requestBody
    );

    /**
     * 获取指定的聊天助手的会话
     * @param requestBody
     * @return
     */
    TableDataInfo getSession(
            Map<String, Object> requestBody
    );

    /**
     * 删除聊天助手的会话
     * @param requestBody
     * {
     *     "ids":list[string]
     * }
     * @return
     */
    TableDataInfo deleteSessions(
            Map<String, Object> requestBody
    );

    TableDataInfo generateChart(Map<String, Object> chartConfig);
}
